package io.geekidea.boot.util.StringUtils;

import com.baiwang.open.entity.request.node.SOutputinvoiceInvoiceBalanceInfo;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ParseJson {
    public List<SOutputinvoiceInvoiceBalanceInfo> convertJsonToBalanceInfoList(String jsonStr) throws Exception {
        ObjectMapper objectMapper = new ObjectMapper();
        return objectMapper.readValue(jsonStr, new TypeReference<List<SOutputinvoiceInvoiceBalanceInfo>>() {});
    }
}
